package boot.spring.model.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

/**
 * @TableName track
 */
@TableName(value = "track")
public class Track {
    /**
     *
     */
    @TableId
    private Integer fid;

    /**
     *
     */
    private Object geom;

    /**
     *
     */
    private Long deviceId;

    /**
     *
     */
    private String ct;

    /**
     *
     */
    private Double lon;

    /**
     *
     */
    private Double lat;

    /**
     *
     */
    private Double alt;

    /**
     *
     */
    private Double speed;

    /**
     *
     */
    private Double dir;

    private LocalDateTime ts;

    /**
     *
     */
    public Integer getFid() {
        return fid;
    }

    /**
     *
     */
    public void setFid(Integer fid) {
        this.fid = fid;
    }

    /**
     *
     */
    public Object getGeom() {
        return geom;
    }

    /**
     *
     */
    public void setGeom(Object geom) {
        this.geom = geom;
    }

    /**
     *
     */
    public Long getDeviceId() {
        return deviceId;
    }

    /**
     *
     */
    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    /**
     *
     */
    public String getCt() {
        return ct;
    }

    /**
     *
     */
    public void setCt(String ct) {
        this.ct = ct;
    }

    /**
     *
     */
    public Double getLon() {
        return lon;
    }

    /**
     *
     */
    public void setLon(Double lon) {
        this.lon = lon;
    }

    /**
     *
     */
    public Double getLat() {
        return lat;
    }

    /**
     *
     */
    public void setLat(Double lat) {
        this.lat = lat;
    }

    /**
     *
     */
    public Double getAlt() {
        return alt;
    }

    /**
     *
     */
    public void setAlt(Double alt) {
        this.alt = alt;
    }

    /**
     *
     */
    public Double getSpeed() {
        return speed;
    }

    /**
     *
     */
    public void setSpeed(Double speed) {
        this.speed = speed;
    }

    /**
     *
     */
    public Double getDir() {
        return dir;
    }

    /**
     *
     */
    public void setDir(Double dir) {
        this.dir = dir;
    }

    public LocalDateTime getTs() {
        return ts;
    }

    public void setTs(LocalDateTime ts) {
        this.ts = ts;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Track other = (Track) that;
        return (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))
                && (this.getGeom() == null ? other.getGeom() == null : this.getGeom().equals(other.getGeom()))
                && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
                && (this.getCt() == null ? other.getCt() == null : this.getCt().equals(other.getCt()))
                && (this.getLon() == null ? other.getLon() == null : this.getLon().equals(other.getLon()))
                && (this.getLat() == null ? other.getLat() == null : this.getLat().equals(other.getLat()))
                && (this.getAlt() == null ? other.getAlt() == null : this.getAlt().equals(other.getAlt()))
                && (this.getSpeed() == null ? other.getSpeed() == null : this.getSpeed().equals(other.getSpeed()))
                && (this.getDir() == null ? other.getDir() == null : this.getDir().equals(other.getDir()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getGeom() == null) ? 0 : getGeom().hashCode());
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getCt() == null) ? 0 : getCt().hashCode());
        result = prime * result + ((getLon() == null) ? 0 : getLon().hashCode());
        result = prime * result + ((getLat() == null) ? 0 : getLat().hashCode());
        result = prime * result + ((getAlt() == null) ? 0 : getAlt().hashCode());
        result = prime * result + ((getSpeed() == null) ? 0 : getSpeed().hashCode());
        result = prime * result + ((getDir() == null) ? 0 : getDir().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fid=").append(fid);
        sb.append(", geom=").append(geom);
        sb.append(", deviceId=").append(deviceId);
        sb.append(", ct=").append(ct);
        sb.append(", lon=").append(lon);
        sb.append(", lat=").append(lat);
        sb.append(", alt=").append(alt);
        sb.append(", speed=").append(speed);
        sb.append(", dir=").append(dir);
        sb.append("]");
        return sb.toString();
    }
}